/**
 * @ author: 汪孟苹
 */
define(["oms_config/root","fu/template/workBench/workBench_babyList.tpl"],function($root,$tpl){
	var tpl = {};

	/* 计划随访患者.列表 */
	tpl.init3 = function(){
		var config = $root.init();
		var html = '';
		html += $tpl[config.tpl.workBenchBabyAllList](); // 配置在配置文件里的函数
		return html;
	}
	/* 计划随访患者.姓按钮 */
	tpl.init4 = function(){
		var html = '';
		html += FirstName();
		return html;
	}
	/* 计划随访患者.队列select */
	tpl.init5 = function(){
		var html = '';
		html += selectQueue();
		return html;
	}
	/* 计划随访患者.底部统计 */
	tpl.init6 = function(){
		var html = '';
		html += windowBottomStatistics();
		return html;
	}
	/* 计划随访患者.顶部统计 */
	tpl.init7 = function(){
		var html = '';
		html += windowTopStatistics();
		return html;
	}
	/* 今日门诊记录.右侧 */
	tpl.init8 = function(){
		var html = '';
		html += windowOperateList();
		return html; 
	}

	var FirstName = function(){
		return  '<script id="tpl_workBench_firstName" type="text/html">'+
				'   {{each rows as value i}}'+
				'	    <button type="button" class="btn btn-default">{{value}}</button>'+
				'	{{/each}}'+
				'</script>';
	}
	var selectQueue = function(){
		return 	'<script id="tpl_workBench_select" type="text/html">'+	
				'	<select class="form-control">'+
				'	  	<option value="">全部</option>'+
				'		{{each rows as value i}}'+
				'	  		<option value="{{value.id}}">{{value.queueName}}</option>'+
				'		{{/each}}'+
				'	</select>'+
				'</script>';
	}
	var windowBottomStatistics = function(){
		return 	'<script id="tpl_workBench_bottomStatistics" type="text/html">'+
				'	计划{{windowPtTotal}}人/已随访{{windowPtFinish}}人/进行中{{windowPtGoing}}人'+
				'</script>';
	}
	var windowTopStatistics = function(){
		var config = $root.init();
		return 	'<script id="tpl_workBench_topStatistics" type="text/html">'+
				'	<div class="col-sm-2 col-md-2">'+
				'		<div class="dashboard-report-card dashboard-add">'+
				'			<div class="text-center" id="addPatient">'+
				'				<div><i class="fa fa-plus dashboard-add-icon"></i></div>'+
				'				<div class="dashboard-add-label" data-language="true" data-language-key="workBenchAddpatient">' + config.language.workBenchAddpatient + '</div>'+
				'			</div>'+
				'		</div>'+
				' 	</div>'+
				'	<div class="col-sm-2 col-md-2">'+
				'  		<div  class="dashboard-report-card">'+
				'			<div class="row">'+
				'				<div class="col-sm-3 col-md-3"><img class="statics-icon" src="page/followup/imgs/workBench/todayDone.png"></div>'+
				'				<div class="col-sm-9 col-md-9 text-right">'+
				'					<div class="dashboard-report-val"><span class="timer">{{dayIncrDoorNum}}</span>人</div>'+
				'					<div class="dashboard-report-label">今日门诊人数</div>'+
				'				</div>'+
				'			</div>'+
				'		</div>'+
				'  	</div>'+
				'  	<div class="col-sm-2 col-md-2">'+
				'  		<div  class="dashboard-report-card">'+
				'			<div class="row">'+
				'				<div class="col-sm-3 col-md-3"><img class="statics-icon" src="page/followup/imgs/workBench/todayAdd.png"></div>'+
				'				<div class="col-sm-9 col-md-9 text-right">'+
				'					<div class="dashboard-report-val"><span class="timer">{{dayIncrPtNum}}</span>人</div>'+
				'					<div class="dashboard-report-label" data-language="true" data-language-key="workBenchTodaypatient">' + config.language.workBenchTodaypatient + '</div>'+
				'				</div>'+
				'			</div>'+
				'		</div>'+
				'  	</div>'+
				'  	<div class="col-sm-2 col-md-2">'+
				'  		<div  class="dashboard-report-card">'+
				'			<div class="row">'+
				'				<div class="col-sm-3 col-md-3"><img class="statics-icon" src="page/followup/imgs/workBench/SumNumber.png"></div>'+
				'				<div class="col-sm-9 col-md-9 text-right">'+
				'					<div class="dashboard-report-val"><span class="timer">{{followPtTotal}}</span>人</div>'+
				'					<div class="dashboard-report-label" data-language="true" data-language-key="workBenchTodaypatienttotal">' + config.language.workBenchTodaypatienttotal + '</div>'+
				'				</div>'+
				'			</div>'+
				'		</div>'+
				'  	</div>'+
				'  	<div class="col-sm-2 col-md-2">'+
				'  		<div  class="dashboard-report-card">'+
				'			<div class="row">'+
				'				<div class="col-sm-3 col-md-3"><img class="statics-icon" src="page/followup/imgs/workBench/Overdue.png"></div>'+
				'				<div class="col-sm-9 col-md-9 text-right">'+
				'					<div class="dashboard-report-val"><span class="timer">{{dayLostNum}}</span>人</div>'+
				'					<div class="dashboard-report-label">今日失访人数</div>'+
				'				</div>'+
				'			</div>'+
				'		</div>'+
				'  	</div>'+
				'</script>';
	}
	var windowOperateList = function(){
		return 	'<script id="tpl_workBench_operateList" type="text/html">'+
				'{{each rows as value i}}'+
				'	<div class="row baby-done">'+
				'		<div class="col-sm-6 col-md-6 ellipsis-1">{{value.patientName}}</div>'+
				'		<div class="col-sm-6 col-md-6 ellipsis-1 text-right color-9">{{value.dealTime}}</div>'+
				'	</div>'+
				'{{/each}}'+
				'</script>';
	}

	return tpl;
});